package main

import (
	"fmt"
	"io"
	"net/http"
	"os"
	"strings"
)

func main() {
	var url = "www.google-analytics.com/analytics.js"
	if strings.HasPrefix(url, "https://") == false {
		url = strings.Join([]string{"https://", url}, "")
	}

	resp, err := http.Get(url)
	if err != nil {
		fmt.Fprint(os.Stderr, "fetch:%v\n", err)
		os.Exit(1)
	}
	/*b,err:=ioutil.ReadAll(resp.Body)*/
	fmt.Println("code:", resp.Status)
	io.Copy(os.Stdout, resp.Body)
	resp.Body.Close()
	/*if err!=nil{
		fmt.Fprint(os.Stderr,"fetch:reading %s : %v \n",url,err)
		os.Exit(1)
	}
	fmt.Printf("%s",b)*/

}
